import request from '@/utils/request'

export function waypointList(query) {
  return request({
    url: '/wayPoint/list',
    method: 'get',
    params: query
  })
}

export function waypointAdd(data) {
  return request({
    url: '/wayPoint/create',
    method: 'post',
    data
  })
}

export function waypointDel(id) {
  return request({
    url: `/wayPoint/delete/${id}`,
    method: 'delete'
  })
}

export function waypointUpdate(data) {
  return request({
    url: '/wayPoint/update',
    method: 'post',
    data
  })
}

export function waypointStatus(data) {
  return request({
    url: '/wayPoint/deactivate',
    method: 'post',
    data
  })
}

export function airrouteList(query) {
  return request({
    url: '/route/list',
    method: 'get',
    params: query
  })
}

export function airrouteAdd(data) {
  return request({
    url: '/route/create',
    method: 'post',
    data
  })
}

export function airrouteDel(id) {
  return request({
    url: `/route/delete/${id}`,
    method: 'delete'
  })
}

export function airrouteDetail(query) {
  return request({
    url: `/route/getDetail`,
    method: 'get',
    params: query
  })
}

export function airrouteUpdate(data) {
  return request({
    url: '/route/update',
    method: 'post',
    data
  })
}

export function airrouteStatus(data) {
  return request({
    url: '/route/deactivate',
    method: 'post',
    data
  })
}
